/**
 * Copyright &copy; 2015-2020 <a href="www.dsesa.cn/">ESA</a> All rights reserved.
 */
package com.jeeplus.modules.buzz.arch2Workjcdj.service;

import com.jeeplus.core.persistence.Page;
import com.jeeplus.core.service.CrudService;
import com.jeeplus.modules.buzz.arch2Workjcdj.entity.Arch2Workjcdj;
import com.jeeplus.modules.buzz.arch2Workjcdj.mapper.Arch2WorkjcdjMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * 待检查登记Service
 * @author 待检查登记
 * @version 2019-10-03
 */
@Service
@Transactional(readOnly = true)
public class Arch2WorkjcdjService extends CrudService<Arch2WorkjcdjMapper, Arch2Workjcdj> {

	@Autowired
	Arch2WorkjcdjMapper arch2WorkjcdjMapper;


	public Arch2Workjcdj get(String id) {
		return super.get(id);
	}

	public List<Arch2Workjcdj> findList(Arch2Workjcdj arch2Workjcdj) {
		return super.findList(arch2Workjcdj);
	}

	public Page<Arch2Workjcdj> findPage(Page<Arch2Workjcdj> page, Arch2Workjcdj arch2Workjcdj) {
		dataRuleFilter(arch2Workjcdj);
		List<Arch2Workjcdj> list = arch2WorkjcdjMapper.findList(arch2Workjcdj,page);
		page.setList(list);
		arch2Workjcdj.setPage(page);
		if(list != null && list.size() > 0){
			page.setCount(list.get(0).getCount());
		}else {
			page.setCount(0);
		}
		return page;
	}

}
